package com.openbravo.pos.inventory;

import com.openbravo.format.Formats;
import com.openbravo.pos.ticket.ProductInfoExt;
import com.openbravo.pos.util.StringUtils;

public class InventoryLine
{
  private double m_dMultiply;
  private double m_dPrice;
  private String m_sProdID;
  private String m_sProdName;
  private String attsetid;
  private String attsetinstid;
  private String attsetinstdesc;

  public InventoryLine(ProductInfoExt paramProductInfoExt)
  {
    this.m_sProdID = paramProductInfoExt.getID();
    this.m_sProdName = paramProductInfoExt.getName();
    this.m_dMultiply = 1.0D;
    this.m_dPrice = paramProductInfoExt.getPriceBuy();
    this.attsetid = paramProductInfoExt.getAttributeSetID();
    this.attsetinstid = null;
    this.attsetinstdesc = null;
  }

  public InventoryLine(ProductInfoExt paramProductInfoExt, double paramDouble1, double paramDouble2)
  {
    this.m_sProdID = paramProductInfoExt.getID();
    this.m_sProdName = paramProductInfoExt.getName();
    this.m_dMultiply = paramDouble1;
    this.m_dPrice = paramDouble2;
    this.attsetid = paramProductInfoExt.getAttributeSetID();
    this.attsetinstid = null;
    this.attsetinstdesc = null;
  }

  public String getProductID()
  {
    return this.m_sProdID;
  }

  public String getProductName()
  {
    return this.m_sProdName;
  }

  public void setProductName(String paramString)
  {
    if (this.m_sProdID == null)
      this.m_sProdName = paramString;
  }

  public double getMultiply()
  {
    return this.m_dMultiply;
  }

  public void setMultiply(double paramDouble)
  {
    this.m_dMultiply = paramDouble;
  }

  public double getPrice()
  {
    return this.m_dPrice;
  }

  public void setPrice(double paramDouble)
  {
    this.m_dPrice = paramDouble;
  }

  public double getSubValue()
  {
    return this.m_dMultiply * this.m_dPrice;
  }

  public String getProductAttSetInstId()
  {
    return this.attsetinstid;
  }

  public void setProductAttSetInstId(String paramString)
  {
    this.attsetinstid = paramString;
  }

  public String getProductAttSetId()
  {
    return this.attsetid;
  }

  public String getProductAttSetInstDesc()
  {
    return this.attsetinstdesc;
  }

  public void setProductAttSetInstDesc(String paramString)
  {
    this.attsetinstdesc = paramString;
  }

  public String printName()
  {
    return StringUtils.encodeXML(this.m_sProdName);
  }

  public String printPrice()
  {
    if (this.m_dMultiply == 1.0D)
      return "";
    return Formats.CURRENCY.formatValue(new Double(getPrice()));
  }

  public String printMultiply()
  {
    return Formats.DOUBLE.formatValue(new Double(this.m_dMultiply));
  }

  public String printSubValue()
  {
    return Formats.CURRENCY.formatValue(new Double(getSubValue()));
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.inventory.InventoryLine
 * JD-Core Version:    0.6.0
 */